package ch.areion.areionapp.io;

public enum BoxNumber {
	NONE(0),
	N1(1),
	N2(2),
	N3(3),
	N4(4),
	N5(5),
	LOW_BATTERY(7),
	ERROR(8);
	
	final int value;
	private BoxNumber(int value) {
		this.value = value;
	}
	
	public int getValue() {
		return value;
	}
	
	public static BoxNumber of(int value) {
		switch(value) {
			case 1: return N1;
			case 2: return N1;
			case 3: return N1;
			case 4: return N1;
			case 5: return N1;
			case 7: return LOW_BATTERY;
			case 8: return ERROR;
		}
		return NONE;
	}
}
